package org.example.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.example.storage.model.StorageTbl;

public interface StorageTblMapper extends BaseMapper<StorageTbl> {

    /**
     * 根据商品编号查询库存信息
     * @param commodityCode 商品编号
     * @return
     */
    StorageTbl findByCommodityCode(String commodityCode);

    /**
     * 根据商品编号更新库存信息
     * @param commodityCode
     * @param currentCount
     */
    void updateCountByCommodityCode(String commodityCode, int currentCount);
}
